/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jpapractica;

import javax.persistence.*;


@Entity
public class Song {

    @Id int id;
    String title;
    float duration;
    @ManyToOne
    Soundtrack soundtrack;
    @ManyToOne
    Artist artist;
    
    public Song(){}
    public Song(int id){
        this.id = id;
    }
    public Song(int id, String title, float duration ){
        this.id=id;
        this.title= title;
        this.duration=duration;
    }
        public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public float getDuration() {
        return duration;
    }

    public void setDuration(float duration) {
        this.duration = duration;
    }

    public Soundtrack getSoundtrack() {
        return soundtrack;
    }

    public void setSoundtrack(Soundtrack soundtrack) {
        this.soundtrack = soundtrack;
    }

    public Artist getArtist() {
        return artist;
    }

    public void setArtist(Artist artist) {
        this.artist = artist;
    }

    
}
